package huffmanTree;

/**
 * @author Aaron
 * @desc
 * @createTime 2021/12/10 10:57
 * @since
 */
public class SQLAuditRecordVO {
    protected int affectedRows;
    protected String command;
    protected int connectionId;
    protected String failedReason;
    protected String host;
    protected int inMultiQuery;
    protected String ip;
    protected String logId;
    protected long matchedRows;
    protected int port;
    protected long queryRows;
    protected long requestEndTime;
    protected long requestTime;
    protected long responseEndTime;
    protected long responseTime;
    protected String sqlSubtype;
    protected String sqlType;
    protected int status=-1;
    protected String user;
    protected int hotdbId;
    protected String logicName;

    /**
     * 总耗时
     */
    public long getResponseEndTimeRequestTime(){
        return responseEndTime-requestTime;
    }

    /**
     * 发包耗时
     */
    public long getRequestEndTimeRequestTime(){
        return requestEndTime-requestTime;
    }

    /**
     * 计算耗时
     * @return
     */
    public long getResponseTimeRequestEndTime(){
        return responseTime-requestEndTime;
    }

    /**
     * 收包耗时
     * @return
     */
    public long getResponseEndTimeResponseTime(){
        return responseEndTime-responseTime;
    }

    public String getLogicName() {
        return logicName;
    }

    public void setLogicName(String logicName) {
        this.logicName = logicName;
    }

    public int getHotdbId() {
        return hotdbId;
    }

    public void setHotdbId(int hotdbId) {
        this.hotdbId = hotdbId;
    }

    public int getAffectedRows() {
        return affectedRows;
    }

    public void setAffectedRows(int affectedRows) {
        this.affectedRows = affectedRows;
    }

    public String getCommand() {
        return command;
    }

    public void setCommand(String command) {
        this.command = command;
    }

    public int getConnectionId() {
        return connectionId;
    }

    public void setConnectionId(int connectionId) {
        this.connectionId = connectionId;
    }

    public String getFailedReason() {
        return failedReason;
    }

    public void setFailedReason(String failedReason) {
        this.failedReason = failedReason;
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public int getInMultiQuery() {
        return inMultiQuery;
    }

    public void setInMultiQuery(int inMultiQuery) {
        this.inMultiQuery = inMultiQuery;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getLogId() {
        return logId;
    }

    public void setLogId(String logId) {
        this.logId = logId;
    }

    public long getMatchedRows() {
        return matchedRows;
    }

    public void setMatchedRows(long matchedRows) {
        this.matchedRows = matchedRows;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public long getQueryRows() {
        return queryRows;
    }

    public void setQueryRows(long queryRows) {
        this.queryRows = queryRows;
    }

    public long getRequestEndTime() {
        return requestEndTime;
    }

    public void setRequestEndTime(long requestEndTime) {
        this.requestEndTime = requestEndTime;
    }

    public long getRequestTime() {
        return requestTime;
    }

    public void setRequestTime(long requestTime) {
        this.requestTime = requestTime;
    }

    public long getResponseEndTime() {
        return responseEndTime;
    }

    public void setResponseEndTime(long responseEndTime) {
        this.responseEndTime = responseEndTime;
    }

    public long getResponseTime() {
        return responseTime;
    }

    public void setResponseTime(long responseTime) {
        this.responseTime = responseTime;
    }

    public String getSqlSubtype() {
        return sqlSubtype;
    }

    public void setSqlSubtype(String sqlSubtype) {
        this.sqlSubtype = sqlSubtype;
    }

    public String getSqlType() {
        return sqlType;
    }

    public void setSqlType(String sqlType) {
        this.sqlType = sqlType;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }
}
